#ifndef _ELEMENTS_LABEL_H_
# define _ELEMENTS_LABEL_H_

# include "config.h"
# include <string>
# include "Utils\\Font.h"
# include "Utils\\Rect.h"
# include "Utils\\Color.h"
# include "Elements\\AElement.h"

NS_BEGIN(SDL)
	NS_BEGIN(ELEMENTS)

	class Label : public AElement
	{
	private:
		std::wstring m_text;
		UTILS::Font* m_font;
		UTILS::Color m_foreground;
		bool m_deleteFont;
		UTILS::Color m_background;

	public:
		Label(UTILS::Font* _font, UTILS::Color const& _foreground,
			  bool _deleteFont = false,
			  UTILS::Color const& _background = UTILS::Color());
		Label(Label const& _label);
		virtual ~Label();

		Label& operator=(Label const& _label);
		bool operator==(Label const& _label) const;
		bool operator!=(Label const& _label) const;

		virtual bool Draw(SDL_Surface* _screen);
		virtual void SetPosition(Sint16 _x, Sint16 _y);
		virtual void SetPosition(UTILS::Rect const& _position);
		virtual void Move(Sint16 _offsetX, Sint16 _offsetY);
		virtual void Move(UTILS::Rect const& _offset);
		virtual void Render(std::wstring const& _text,
			UTILS::tRenderSolidBlended _render = UTILS::Font::RenderSolid);
		virtual void Render(std::wstring const& _text, UTILS::tRenderShaded _render);
		virtual void Render(std::string const& _text,
			UTILS::tRenderSolidBlended _render = UTILS::Font::RenderSolid);
		virtual void Render(std::string const& _text, UTILS::tRenderShaded _render);

		std::wstring const& GetText() const;
		UTILS::Font* GetFont() const;
		void SetFont(UTILS::Font* _font);
		UTILS::Color const& GetForeground() const;
		void SetForeground(UTILS::Color const& _foreground);
		bool GetDeleteFont() const;
		void SetDeleteFont(bool _value);
		UTILS::Color const& GetBackground() const;
		void SetBackground(UTILS::Color const& _backrgound);

	public:
		__declspec(property(get=GetText)) std::wstring text;
		__declspec(property(get=GetFont, put=SetFont)) UTILS::Font* font;
		__declspec(property(get=GetForeground, put=SetForeground))
			UTILS::Color foreground;
		__declspec(property(get=GetDeleteFont, put=SetDeleteFont)) bool deleteFont;
		__declspec(property(get=GetBackground, put=SetBackground))
			UTILS::Color background;
	};

	NS_END(ELEMENTS)
NS_END(ELEMENTS)

#endif // _ELEMENTS_LABEL_H_
